﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Register.aspx.vb" Inherits="TWIN_test.Register1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Registration</title>
</head>
<body background="../../Images/Training-Employee-Background.gif">
    <form id="form1" runat="server">
    <center><div>
    List of Availalbe Workshops<br />
   <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource1"
            BackColor="White" BorderColor="White" BorderStyle="None" BorderWidth="5px" 
            CellPadding="2" CellSpacing="2">
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
                <asp:BoundField DataField="TITLE" HeaderText="TITLE" SortExpression="TITLE" />
                <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" 
                    SortExpression="DESCRIPTION" />
            </Columns>
        </asp:GridView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
        InsertCommand="INSERT INTO WorkshopsTaken ([Title], [Body], [RecDate]) VALUES (@Title, @Body, @RecDate)"
        SelectCommand="SELECT * FROM WORKSHOPS">
        <InsertParameters>
            <asp:Parameter Name="Title"/>
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:Button id="backButton" runat="server" text="Back" />
    </center></form>
</body>
</html>
